﻿<%@ Page Language="C#" MaintainScrollPositionOnPostback="true" AutoEventWireup="true" CodeFile="bz_jihuatibao.aspx.cs" Inherits="Default3" Title="未提报的计划列表" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

        .style7
        {
            font-size: small;
            text-align: left;
        }
        .style8
        {
            width: 900px;
        }
        .style20
        {
            color: #FF3300;
            font-weight: bold;
            font-size: small;
        }
        .style21
        {
            font-size: small;
        }
        </style>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body background="images/login-bg.jpg">
    <form id="form1" runat="server">
    <div style="text-align: center">
    
    <div class="style7">
    
        <span class="style7">当前位置：</span><asp:HyperLink ID="HyperLink1" runat="server" 
            CssClass="style7" NavigateUrl="~/bz_jihuachakan.aspx" style="color: #000000" 
            ToolTip="点击返回计划单列表页面">计划单列表页面</asp:HyperLink>
        <span class="style7">→ 未提报的计划列表</span><br class="style7" />
        <br /></div>
        <asp:Label ID="Label4" runat="server" style="font-size: small; color: #993366; font-weight: 700" Text="特别提示：每班组每月1至10日最多只能提报10张计划单，请尽量在一张计划单内提报完该类别当月所需的所有材料。"></asp:Label>
        <br />
        <br /><b>未提报的材料计划列表&nbsp;&nbsp;&nbsp;</b><span class="style21">提报人：&nbsp;</span><asp:Label 
            ID="Label1" runat="server" style="font-size: small" Text="Label"></asp:Label>
        <b>&nbsp;</b><span class="style21">类别：</span><asp:Label ID="Label3" runat="server" style="font-size: small; color: #FF5050; font-weight: 700" Text="Label"></asp:Label>
        <b>&nbsp;<asp:Label ID="Label2" runat="server" Text="Label" Visible="False"></asp:Label>
        &nbsp; 
        <asp:Button ID="Button3" runat="server" Text="提报该计划单" 
            onclientclick="return confirm('计划单提报后将无法修改，确认继续吗？')" 
            onclick="Button3_Click" />
        <br />
        <asp:GridView ID="GridView1" runat="server" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="c_id" 
        DataSourceID="SqlDataSource1" EmptyDataText="没有未提报的计划单" 
        EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
        style="text-align: center; font-size: small" Visible="False" Font-Bold="False">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="c_id" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="c_id" />
                <asp:BoundField DataField="lei" HeaderText="类别" SortExpression="lei" />
                <asp:BoundField DataField="chejian" HeaderText="所属车间" 
                SortExpression="chejian" />
                <asp:BoundField DataField="banzu" HeaderText="班组" SortExpression="banzu" />
                <asp:BoundField DataField="nian" HeaderText="年" SortExpression="nian" />
                <asp:BoundField DataField="yue" HeaderText="月" SortExpression="yue" />
                <asp:BoundField DataField="addname" HeaderText="提报人" SortExpression="addname" />
                <asp:BoundField DataField="addtime" HeaderText="提报时间" 
                SortExpression="addtime" />
                <asp:BoundField DataField="zt" HeaderText="zt" SortExpression="zt" 
                Visible="False" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            
            SelectCommand="SELECT * FROM [cailiaoguanli] WHERE (([banzu] = @banzu) AND ([zt] = @zt) AND ([c_id] = @id)) ORDER BY [addtime] DESC">
            <SelectParameters>
                <asp:SessionParameter Name="banzu" SessionField="pn" Type="String" />
                <asp:Parameter DefaultValue="0" Name="zt" Type="String" />
                <asp:QueryStringParameter Name="id" QueryStringField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <b>
                <table align="center" cellspacing="1" class="style8">
                    <tr>
                        <td>
                            <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
                                CellPadding="4" DataKeyNames="id" DataSourceID="SqlDataSource_yitianjia" 
                                EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
                                style="font-size: small" EmptyDataText="没有符合条件的数据" 
                                onrowdatabound="GridView3_RowDataBound" Font-Bold="False" ShowFooter="True">
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                                    <asp:TemplateField HeaderText="序号"></asp:TemplateField>
                                    <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="id" Visible="False" />
                                    <asp:BoundField DataField="c_id" HeaderText="c_id" SortExpression="c_id" 
                                        Visible="False" />
                                    <asp:BoundField DataField="leibie1" HeaderText="类别" SortExpression="leibie1" />
                                    <asp:BoundField DataField="leibie2" HeaderText="子类别" SortExpression="leibie2" Visible="False" />
                                    <asp:BoundField DataField="bianhao" HeaderText="物资编码" SortExpression="bianhao" />
                                    <asp:BoundField DataField="mingcheng" HeaderText="物资名称" SortExpression="mingcheng" />
                                    <asp:BoundField DataField="guige" HeaderText="规格型号" SortExpression="guige" 
                                        HtmlEncode="False" />
                                    <asp:BoundField DataField="danwei" HeaderText="单位" SortExpression="danwei" />
                                    <asp:BoundField DataField="danjia" HeaderText="目录价" SortExpression="danjia" />
                                    <asp:BoundField DataField="banzushuliang" HeaderText="班组提报数量" 
                                        SortExpression="banzushuliang" />
                                    <asp:BoundField DataField="chejianshuliang" HeaderText="chejianshuliang" 
                                        SortExpression="chejianshuliang" Visible="False" />
                                    <asp:BoundField DataField="duanshuliang" HeaderText="duanshuliang" 
                                        SortExpression="duanshuliang" Visible="False" />
                                    <asp:BoundField DataField="beizhu" HeaderText="备注" SortExpression="beizhu" />
                                </Columns>
                                <EditRowStyle BackColor="#2461BF" />
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource_yitianjia" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
                                DeleteCommand="DELETE FROM [cailiaomingxi] WHERE [id] = @id" 
                                InsertCommand="INSERT INTO [cailiaomingxi] ([c_id], [leibie1], [leibie2], [bianhao], [mingcheng], [guige], [danwei], [danjia], [banzushuliang], [chejianshuliang], [duanshuliang], [beizhu]) VALUES (@c_id, @leibie1, @leibie2, @bianhao, @mingcheng, @guige, @danwei, @danjia, @banzushuliang, @chejianshuliang, @duanshuliang, @beizhu)" 
                                SelectCommand="SELECT * FROM [cailiaomingxi] WHERE ([c_id] = @c_id) ORDER BY [id]" 
                                UpdateCommand="UPDATE [cailiaomingxi] SET [c_id] = @c_id, [leibie1] = @leibie1, [leibie2] = @leibie2, [bianhao] = @bianhao, [mingcheng] = @mingcheng, [guige] = @guige, [danwei] = @danwei, [danjia] = @danjia, [banzushuliang] = @banzushuliang, [chejianshuliang] = @chejianshuliang, [duanshuliang] = @duanshuliang, [beizhu] = @beizhu WHERE [id] = @id">
                                <DeleteParameters>
                                    <asp:Parameter Name="id" Type="Int32" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="c_id" Type="Int32" />
                                    <asp:Parameter Name="leibie1" Type="String" />
                                    <asp:Parameter Name="leibie2" Type="String" />
                                    <asp:Parameter Name="bianhao" Type="String" />
                                    <asp:Parameter Name="mingcheng" Type="String" />
                                    <asp:Parameter Name="guige" Type="String" />
                                    <asp:Parameter Name="danwei" Type="String" />
                                    <asp:Parameter Name="danjia" Type="String" />
                                    <asp:Parameter Name="banzushuliang" Type="Int32" />
                                    <asp:Parameter Name="chejianshuliang" Type="Int32" />
                                    <asp:Parameter Name="duanshuliang" Type="Int32" />
                                    <asp:Parameter Name="beizhu" Type="String" />
                                </InsertParameters>
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="c_id" QueryStringField="id" Type="Int32" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="c_id" Type="Int32" />
                                    <asp:Parameter Name="leibie1" Type="String" />
                                    <asp:Parameter Name="leibie2" Type="String" />
                                    <asp:Parameter Name="bianhao" Type="String" />
                                    <asp:Parameter Name="mingcheng" Type="String" />
                                    <asp:Parameter Name="guige" Type="String" />
                                    <asp:Parameter Name="danwei" Type="String" />
                                    <asp:Parameter Name="danjia" Type="String" />
                                    <asp:Parameter Name="banzushuliang" Type="Int32" />
                                    <asp:Parameter Name="chejianshuliang" Type="Int32" />
                                    <asp:Parameter Name="duanshuliang" Type="Int32" />
                                    <asp:Parameter Name="beizhu" Type="String" />
                                    <asp:Parameter Name="id" Type="Int32" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td><hr class="横线" /> 
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <span class="style21">类别：<asp:Label ID="Label5" runat="server" style="font-size: small; color: #FF5050; font-weight: 700" Text="Label"></asp:Label>
                            子类别：<b><asp:Label ID="Label6" runat="server" style="font-size: small; color: #FF5050; font-weight: 700" Text="Label"></asp:Label>
                            <br />
                            </b>
                            <br />
                            关键字</span><asp:TextBox ID="TextBox_chaxun" runat="server"></asp:TextBox>
                            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="查询" 
                                CausesValidation="False" />
                            <span class="style20">←←输入关键字查询所需材料</span></td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                            <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                                AutoGenerateColumns="False" CellPadding="4" DataKeyNames="j_id" 
                                DataSourceID="SqlDataSource_cailiaobiao" EnableModelValidation="True" 
                                ForeColor="#333333" GridLines="None" style="font-size: small" 
                                onrowdatabound="GridView2_RowDataBound" 
                                onpageindexchanging="GridView2_PageIndexChanging" 
                                EmptyDataText="暂无符合条件的材料" Font-Bold="False" AllowSorting="True" OnSorted="GridView2_Sorted">
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:TemplateField HeaderText="选择" ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="数量">
                                        <ItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server" Width="20px"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="备注">
                                        <ItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="序号"></asp:TemplateField>
                                    <asp:BoundField DataField="j_id" HeaderText="id" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="j_id" Visible="False" />
                                    <asp:BoundField DataField="xuhao" HeaderText="序号" ReadOnly="True" 
                                        SortExpression="xuhao" Visible="False" />
                                    <asp:BoundField DataField="leibie1" HeaderText="类别" ReadOnly="True" 
                                        SortExpression="leibie1" />
                                    <asp:BoundField DataField="leibie2" HeaderText="子类别" ReadOnly="True" 
                                        SortExpression="leibie2" Visible="False" />
                                    <asp:BoundField DataField="bianhao" HeaderText="物资编码" ReadOnly="True" 
                                        SortExpression="bianhao" />
                                    <asp:BoundField DataField="mingcheng" HeaderText="物资名称" ReadOnly="True" 
                                        SortExpression="mingcheng" />
                                    <asp:BoundField DataField="guige" HeaderText="规格型号" ReadOnly="True" 
                                        SortExpression="guige" />
                                    <asp:BoundField DataField="tuhao" HeaderText="图号" ReadOnly="True" 
                                        SortExpression="tuhao" Visible="False" />
                                    <asp:BoundField DataField="danwei" HeaderText="单位" ReadOnly="True" 
                                        SortExpression="danwei" />
                                    <asp:BoundField DataField="danjia" HeaderText="目录价" ReadOnly="True" 
                                        SortExpression="danjia" />
                                    <asp:BoundField DataField="beizhu" HeaderText="备注" ReadOnly="True" 
                                        SortExpression="beizhu" Visible="False" />
                                    <asp:BoundField DataField="j_id" HeaderText="编号" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="j_id" />
                                </Columns>
                                <EditRowStyle BackColor="#2461BF" />
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            </asp:GridView>
                            <br />
                            <asp:SqlDataSource ID="SqlDataSource_cailiaobiao" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>">
                            </asp:SqlDataSource>
                            </b>
                            <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
                                Text="添加到未提报材料计划列表" Visible="False" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
                </b>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        </b>
    
    </div>
    </form>
    <p class="style21" style="TEXT-ALIGN: center">
        &nbsp;<br />
        &nbsp;安康供电段信息中心制作 2015</p>
</body>
</html>
